package cn.lger.icollege.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;

/**
 * Code that Changed the World
 * Pro said
 * Created by Pro on 2018-04-14.
 */
@Entity
@Data
@Table(name = "tb_admin")
public class Admin implements Serializable {

    @Transient
    public final static String role = Role.ADMIN.name();
    @Id
    private String username;//用户名，账号

    private String iconPath = "icon/common.jpg";

    @Column(nullable = false)
    @JsonIgnore
    private String password; // 密码

    @Column(nullable = false)
    private String name; // 姓名

    public String getRole() {
        return role;
    }
}
